package com.sunny.blog.pojo;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 回复表
 * </p>
 *
 * @author sunt
 * @since 2020-05-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("T_REPLY")
public class BlogReplyBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 回复ID
     */
    @TableId("REPLY_ID")
    private String replyId;

    /**
     * 评论ID
     */
    @TableField("COMMENT_ID")
    private String commentId;

    /**
     * 回复内容
     */
    @TableField("REPLY_CONTENT")
    private String replyContent;

    /**
     * 回复用户ID(当前用户)
     */
    @TableField("REPLY_USER_ID")
    private String replyUserId;

    /**
     * 目标用户ID(发帖用户)
     */
    @TableField("TO_USER_ID")
    private String toUserId;

    /**
     * 回复时间
     */
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @JsonFormat(pattern=DatePattern.NORM_DATETIME_PATTERN,timezone="GMT+8")
    private Date replyDate;

    /**
     * 是否显示(默认:不显示:1 需要审核通过才显示)
     */
    private int replyState;

    /**
     * 回复备注
     */
    private String replyRemark;

    @TableField(exist = false)
    private String blogId;


}
